<?php

namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;
use Brick\Math\RoundingMode;

class GcUserImagesResource extends JsonResource
{
    public function toArray($request)
    {
    	$data = $this->resource;
    	
        return [
	        'id' 				=> (int)$data->id,
	        'user_id' 			=> (int)$data->user_id,
	        'title'    => $data->title_main,
	        'content_main'=>$data->content_main,
	        'gpts'    => $data->gcGptImages,
	        'is_used'=>$data->is_used,
	        'change_num'=>$data->change_num,
	        'images' => imgs_path($data->images),
	        'created_at' => (string)$data->created_at,
        ];
    }
}
